<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/doc/src/uic.qdoc -->
<head>
  <title>Qt 4.3: User Interface Compiler (uic)</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">User Interface Compiler (uic)<br /><small></small></h1>
<a name="uic"></a><p>This page documents the <i>User Interface Compiler</i> for the Qt GUI toolkit. The <tt>uic</tt> reads an XML format user interface definition (<tt>.ui</tt>) file as generated by <a href="designer-manual.html">Qt Designer</a> and creates a corresponding C++ header file.</p>
<p>Usage:</p>
<pre> uic [options] &lt;uifile&gt;</pre>
<a name="options"></a>
<h2>Options</h2>
<p>The following table lists the command-line options recognized by <tt>uic</tt>.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Option</th><th>Description</th></tr></thead>
<tr valign="top" class="odd"><td><tt>-o &lt;file&gt;</tt></td><td>Write output to <tt>&lt;file&gt;</tt> instead of to standard output.</td></tr>
<tr valign="top" class="even"><td><tt>-tr &lt;func&gt;</tt></td><td>Use <tt>&lt;func&gt;</tt> for translating strings instead of <tt>tr()</tt>.</td></tr>
<tr valign="top" class="odd"><td><tt>-p</tt></td><td>Don't generate guards against multiple inclusion (<tt>#ifndef</tt> FOO_H ..&#x2e;)&#x2e;</td></tr>
<tr valign="top" class="even"><td><tt>-h</tt></td><td>Display the usage and the list of options.</td></tr>
<tr valign="top" class="odd"><td><tt>-v</tt></td><td>Display <tt>uic</tt>'s version number.</td></tr>
</table></p>
<a name="examples"></a>
<h2>Examples</h2>
<p>If you use <tt>qmake</tt>, <tt>uic</tt> will be invoked automatically for header files.</p>
<p>Here are useful makefile rules if you only use GNU make:</p>
<pre> ui_%.h: %.ui
         uic $&lt; -o $@</pre>
<p>If you want to write portably, you can use individual rules of the following form:</p>
<pre> ui_foo.h: foo.ui
         uic $&lt; -o $@</pre>
<p>You must also remember to add <tt>ui_foo.h</tt> to your <tt>HEADERS</tt> (substitute your favorite name).</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
